Skip to content

Deprecate redundant Codex APIs and use agent methods in the v1 guides - #6386

Open
marcuswood-oai wants to merge 2 commits into
v1-alphafrom
docs/v1-codex-deprecations
Open

marcuswood-oai wants to merge 2 commits into
v1-alphafrom
docs/v1-codex-deprecations

Conversation

@marcuswood-oai

@marcuswood-oai marcuswood-oai commented Dec 3, 2026 •

Copy link
Copy Markdown

Summary

This pull request updates the v1 README and quickstart to run the first turn with await agent.run(prompt). The quickstart then shows how to stream the tutor's answer with agent.stream(prompt) and ask a follow-up with agent.session().

The migration guide shows the same tutor in v0 and v1. The Codex Runner and Agent.name are deprecated. When porting the tutor, set model on the agent, call its run() method, and read result.output_text. For Python tools, replace the v0 @tool decorator with @function_tool from openai_agents.codex.

Each deprecated Codex API has a short replacement note at its definition. Editors can show the suggested call when a developer uses the Codex Runner or another deprecated class or method.

Test plan

  • Ran the tutor and a function tool on v0.26.2 and v1 Codex with scripted model responses. Also exercised the documented Classic import.
  • Ran the v1 examples for streamed text, a follow-up turn, and resuming a session with SQLite and Postgres. Verified that the resumed model request included the first answer.
  • Checked the deprecation hints with Pyright and exercised both the deprecated and preferred calls with runtime deprecation warnings treated as errors.
  • Ran the seven versioned documentation tests.

Checks

  • Built the versioned docs and checked the rendered v0 and v1 examples and the API reference.
  • Ran .agents/skills/code-change-verification/scripts/run.sh on Linux. Formatting, lint, type checks, and all 315 Codex tests passed.
  • Completed an independent review of the final diff.

@marcuswood-oai
marcuswood-oai requested review from a team, rm-openai and seratch as code owners December 3, 2026 00:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T00:22:20.546807Z a2b4996 New commits
🔒 Security Review ✅ Completed 2026-12-03T00:23:09.921164Z a2b4996 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No actionable findings. Reviewed the complete deprecation/docs change, advisory decorator behavior and dependency compatibility, Agent/Runner delegation, streaming examples, existing-key resume, generated session IDs, and cancellation checkpoint semantics. Independent static review agreed.

No candidate code or tests were executed. Hosted CI has no failures observed; checks remain in progress.

@marcuswood-oai marcuswood-oai changed the title Deprecate v1 Codex preview APIs and use agent methods in the quickstart Deprecate redundant Codex APIs and use agent methods in the v1 guides Dec 3, 2026

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No actionable findings in the documentation follow-up. Verified the latest v1 release uses the openai_agents namespace, the v0 decorator alias exists, and links to removed migration sections were updated. Runtime deprecation behavior is unchanged.

Independent static review agreed. Hosted CI remains in progress; no candidate code or tests were executed locally.

@seratch seratch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea. Other major SDKs expose a run method on the agent instance, and I don't see any technical issues with doing the same as long as the method supports all existing RunConfig options. We can safely deprecate Runner.run and give users enough time to migrate before removing it, say, in v2.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants